from django.urls import path
from rest_framework.routers import SimpleRouter, DefaultRouter
from school.views import *
from rest_framework_jwt.views import obtain_jwt_token

urlpatterns = [
    path('classes/<pk>/member/', ClassesMemberViewSet.as_view({'post': 'add_member'})),
]

router = DefaultRouter()  # 实例化路由器
router.register('classes', ClassesViewSet)  # 注册路由
urlpatterns += router.urls  # 获取生成的路由地址，加到地址集合中去
